<h1>Event Invitees</h1>

<%= form_for :event, :url => {:action => "invitePeople"} do |f| %>

<table>
	  <tr>
		<th>First Name</th>
		<th>Last Name</th>
		<th>Invite?</th>
	  </tr>
	<input type="hidden" name="url" value="<%= request.url %>"/>
	<% @users = User.all %>
	<% @users.each do |user| %>
		  <tr>
			<td><%= user.first_name %></td>
			<td><%= user.last_name %></td>
			<td><%= check_box_tag "invitees["+user.id.to_s+"]" %> <br />
		  </tr>
	<% end %>
</table>

<%= submit_tag "Invite!" %>

<% if flash[:notice] != nil %>
	<%= flash[:notice] %>
<% end %>

<% if flash[:warning] != nil %>
	<%= flash[:warning] %>
<% end %>


<% end %>